package com.jiazhong.多态and转型.Test05;

public class Teacher extends Person{
    private double salary;
    public Teacher(String name, int age) {
        super(name, age);
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public String Say() {
        return "老师"+super.Say()+"salary"+salary;
    }
    public void teach(){
        System.out.println("老师"+getName()+"正在讲java课程...");
    }

}
